package com.ywl5320.mymusic.render;

import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

/**
 * Created by Chen qin lang on 2018/7/18.
 */
public class BaseRender implements GLSurfaceView.Renderer{
    protected OnRenderListener onRenderListener;

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {

    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {

    }

    @Override
    public void onDrawFrame(GL10 gl) {

    }

    public interface OnRenderListener{
        void onRender();
    }
    public void setOnRenderListener(OnRenderListener onRenderListener) {
        this.onRenderListener = onRenderListener;
    }
    public void onRenderYUV(int width, int height, byte[] y, byte[] u, byte[] v) {

    }
}
